//---------------------------------------------------------------------------

#ifndef PurchaseDlgH
#define PurchaseDlgH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>

#include "GlassesFirms.h"

//---------------------------------------------------------------------------
class TfrmPurchaseDlg : public TForm
{
__published:	// IDE-managed Components
        TPanel *pnlMain;
        TLabel *lblModel;
        TLabel *lblFirm;
        TLabel *lblDate;
        TEdit *edtModel;
        TEdit *edtFirm;
        TEdit *edtDate;
        TBitBtn *btnOk;
        TBitBtn *btnHelp;
        TBitBtn *btnCancel;
        TSpeedButton *btnDate;
        TSpeedButton *btnFirm;
        TSpeedButton *btnModel;
        TLabel *lblNote;
        void __fastcall btnDateClick(TObject *Sender);
        void __fastcall btnFirmClick(TObject *Sender);
        void __fastcall FormDestroy(TObject *Sender);
        void __fastcall btnOkClick(TObject *Sender);
private:	// User declarations
        TDatabase* dbMain;
        TGlassesFirm* selectedFirm;
        TGlassesModel* selectedModel;
        TGlassesBridge* bridge;

        void SelectFirmIfNeeded();
        void SelectModelIfNeeded();
public:		// User declarations
        __fastcall TfrmPurchaseDlg(TComponent* Owner, TDatabase * dbMain);
};

#endif
